package com.xnfh.field.viewmodel

import com.xnfh.common.bean.SoilMessage
import com.xnfh.common.bean.SoilZdMessage
import com.xnfh.framework.base.BaseViewModel
import com.xnfh.framework.bean.RespStateData

/**
 * @Description:
 * @Author: ziheng
 * @CreateDate: 2023/11/29 15:09
 * @UpdateUser: ziheng
 * @UpdateDate: 2023/11/29 15:09
 * @UpdateRemark: 更新说明
 */
class SoilMessageViewModel: BaseViewModel() {

    private val soilMessageViewModelRes = SoilMessageViewModelRes()

    var soilZdMessage = RespStateData<SoilZdMessage>()

    fun requestSoilZdMessage(fieldId: String?,lonlats: String?) = launch {
        if(lonlats == null)return@launch
        if(fieldId == null)return@launch
        soilMessageViewModelRes.requestSoilZdMessage(fieldId,lonlats,soilZdMessage)
    }


}